package com.lovo.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;

@ControllerAdvice
@RestController
public class MyExceptionHandling {

@ExceptionHandler
public String exceptionHandler(Exception e) throws Exception {
    if(e.getClass().getName().equals("com.auth0.jwt.exceptions.JWTDecodeException")){
        throw e;
    }
    return e.getClass().getName();
}
}
